<div class="layout_content">
    <header class="demo-header">
        <form action="/product" method="get" class="am-form flt">
            <a href="/search/index">
                <div class="am-form-group" style="width: 100%">
                    <input type="text" class="am-form-field am-radius" name="key" placeholder="搜索" style="border: 0px">
                </div>
            </a>
        </form>
        <div class="header-message flt"><a href="/messagecenter/index"><img src="<?php echo WEBIMG . '/message.png'; ?>" class=""/></a></div>
    </header>

    <div class="swiper-container">
        <div class="swiper-wrapper">
            <?php foreach ($ApiData['advertise_list'] as $k => $v) { ?>
                <div class="swiper-slide">
                    <a href="javascript:;"><img src="<?php echo $v['icon_url']; ?>" width="100%"/></a>
                </div>
            <?php } ?>
        </div>
        <!-- 如果需要分页器 -->
        <div class="swiper-pagination"></div>
    </div>
    <div class="big-div">
        <?php foreach ($ApiData['middle_function_area'] as $key => $val) { ?>
            <a href="<?php if (isset($homemenu[$val['action']['id']])) {
                echo WEBROOT . $homemenu[$val['action']['id']];
            } else { ?>javascript:;<?php } ?>">
                <div class="bigblock">
                    <img src="<?php echo $val['icon_url']; ?>" class="redis"/>
                    <p><?php echo $val['title']; ?></p>
                </div>
            </a>
        <?php } ?>
    </div>
    <div>
        <div class="hot-seal">
            <div class="am-form flt" style="padding-top: 8px;color: #F45C3E;">
                <img src="<?php echo WEBIMG . '/remai_icon.png'; ?>" class="img-bottom"
                     style="width: 20px;padding:0 3.5%;"/><strong style="font-size: 14px;">企业热卖</strong>
            </div>
            <div class="header-message more flt">更多 ></div>
        </div>
        <div class="product-list">
            <?php foreach ($ApiData['product_list'] as $kk => $vv) { ?>
                <a href="<?php echo WEBROOT . '/product/detail/id/' . $vv['id'] . '.html'; ?>">
                    <div style="position: relative;">
                        <div class="proimg"><img src="<?php echo $vv['icon_url']; ?>"/></div>
                        <div class="flt pline" style="width: 100%;">
                            <p class="product"><?php echo cutStr($vv['name'], 7); ?></p>
                            <p class="guige"><?php echo $vv['mass_packing']; ?></p>
                            <p class="price">￥<?php echo $vv['channel_price']; ?></p>
                        </div>
                        <div class="flt cart" style="position:absolute; bottom: 0.5em; right: 1em;width: 1.2em;">
                            <img src="<?php echo WEBIMG . '/addcart_normal.png'; ?>" style="width: 100%;"/>
                        </div>
                    </div>
                </a>
            <?PHP } ?>
        </div>
    </div>

    <?php echo $footer; ?>

</div>
<link rel="stylesheet" href="<?php echo WEBCSS . '/swiper-3.4.1.min.css' ?>"/>
<script type="text/javascript" src="<?php echo WEBJS . '/swiper-3.4.2.jquery.min.js'; ?>"></script>
<script>
    //手机手指左右滑动
    var mySwiper = new Swiper('.swiper-container', {
        pagination: '.swiper-pagination',
        paginationClickable: true,
        autoplay: 5000,
    })
</script>